package com.magnusart.scrumppm.model;

public class TaskBuilder implements Builder
{

	private String description;
	private int id;
	private boolean isDone;
	private int order;

	public TaskBuilder() {
		isDone = false;
		order = Integer.MAX_VALUE;
	}
	
	public TaskBuilder( Task task ) {
		id = task.getID();
		description = task.getDescription();
		isDone = task.isDone();
		order = task.getOrder();
	}
	
	String getDescription() {
		return description;
	}

	int getID() {
		return id;
	}

	boolean isDone() {
		return isDone;
	}

	int getOrder() {
		return order;
	}

	public void setID( int id ) {
		this.id = id;
		
	}

	public void setDescription( String description ) {
		this.description = description;
		
	}

	public void setDone( boolean done ) {
		this.isDone = done;
	}

	public void setOrder( int order ) {
		this.order = order;
	}

	@Override
	public	boolean checkStatus() {
		return id >= 0 && description instanceof String && description.length() > 0;
	}
}
